<template>
  <div>
    <div class="tikuheader">
      <img id="logoimg" src="../../static/imgs/logo_tiku.png"/>
     <div class="tisearch">
       <input class="searhinput" type="text" placeholder="搜索试题" autocomplete="off" name="q" id="aw-search-query">
       <button type="button" class="btn btn-success searchbtn">搜索</button>
     </div>
    </div>
    <div id="nav">
      <div class="content">
        <ul>
          <li><a  v-on:click="setcontent_type(0)">首页</a></li>
          <li><a  v-on:click="setcontent_type(1)">初中试题</a></li>
          <li><a  v-on:click="setcontent_type(2)">高中试题</a></li>
        </ul>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
  import {mapState,mapMutations} from 'vuex'
  export default {
    data() {
      return {}
    },
    computed:mapState({
       content_type:'content_type'
      }
    ),
    methods:{
      setcontent_type(type){
        this.$store.commit('SET_CONTENT_TYPE',{content_type:type});
      }
    }
  }



</script>
<style type="text/css">
  #logoimg {
    height: 30px;
    float: left;
  }
  .tikuheader {
    margin-left: 10px;
    height: 30px;
    width:100%;
  }
  .tisearch {
    float: right;
    margin-right: 50px;
  }
  [class^="icon-"], [class*=" icon-"] {
    -moz-osx-font-smoothing: grayscale;
    font-family: "icomoon";
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 1;
    text-transform: none;
  }
  #global_search_btns {
    color: #999;
    font-size: 18px;
    position: absolute;
    right: 0;
    top: 5px;
  }
  .aw-search-box input {
    border: medium none;
    height: 32px;
    padding-right: 30px;
    width: 260px;
  }

  .searchbtn {
    display:inline;
    background-color: #009A58;
    border-color:#009A58;


  }
  .searhinput {
    display: inline;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
    color: #555;
    font-size: 14px;
    height: 34px;
    line-height: 1.42857;
    padding: 6px 12px;
    transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
  }
  #nav {
    margin-top: 5px;
    width: 100%;
    height: 40px;
    background-color: #0f9d58;
    margin-bottom: 12px;
  }
  .content {
    width: 980px;
    margin: 0 auto;
  }

  #nav ul li {
    float: left;
    border-right: 1px solid #0a7f3d;
    border-left: 1px solid #14bb73;
    width: 101px;
    height: 40px;
    position: relative;
  }
  #nav ul li a:hover {
    width: 105px;
    height: 40px;
    background-color: #0A6539;
    left: -2px;
    top: 0px;
  }
  #nav ul li a {
    text-decoration:none;
    display: block;
    width: 101px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    left: 0px;
    top: 0px;
    font-family: "Microsoft YaHei";
  }
  li {
    list-style: none;
  }
</style>





